useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser',  commonBits.sampleDir() +  'Ams_LocDownload_20041228.bin')
		click('Edit1')
		select('Table', 'rows:[3,4,5,6,7,8,9,10],columns:[4|Loc_Name]')
		select_menu('View>>Table View #{Selected Records#}')
##		select('Table2', 'rows:[3,4,5,6,7,8,9,10],columns:[4|Loc_Name]')
		select('Table', 'cell:4|Loc_Name,2(Penrith)')
		assert_p('Table', 'Content', '[[TAR, 5866, DC, WA Ad Support, , , , , , A], [TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, 2750, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A]]')
		select('Table', 'cell:4|Loc_Name,2(Penrith)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:4|Loc_Name,2(Penrith)')
		assert_p('Table', 'Content', '[[Brand_Id, true], [Loc_Nbr, true], [Loc_Type, true], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, true], [Loc_Addr_Ln3, true], [Loc_Postcode, true], [Loc_State, true], [Loc_Actv_Ind, true]]')

		select('Table', 'cell:Show,0(true)')
		select('Table', 'cell:Show,5(true)')
		select('Table', 'cell:Show,6(true)')
		select('Table', 'cell:Show,7(true)')
		select('Table', 'cell:Show,9(true)')
		select('Table', 'cell:Show,2(true)')
		click('Go')
		select('Table', 'cell:4|Loc_Name,2(Penrith)')
		select('Table', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		assert_p('Table', 'Content', '[[5866, WA Ad Support, , ], [5015, Bankstown, Bankstown, NSW], [5019, Penrith, Penrith, NSW], [5033, Blacktown, Marayong, NSW], [5035, Rockdale, Building B,  Portside DC, NSW], [5037, Miranda, Westfield Shoppingtown, NSW], [5052, Eastwood, Marayong Offsite Reserve, NSW], [5055, Leichhardt, Marketown, NSW]]')
		select('Table', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		select('Table', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		rightclick('Table', '5|Loc_Addr_Ln1,2')
		select('Table', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		select('Table', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		select('Table', 'cell:Show,6(false)')
		select('Table', 'cell:Show,7(false)')
		select('Table', 'cell:Show,9(false)')
		click('Go')
		select('Table', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		select('Table', 'cell:7|Loc_Addr_Ln3,3(Marayong)')
		assert_p('Table', 'Content', '[[5866, WA Ad Support, , , , , A], [5015, Bankstown, Bankstown, Condell Park, 2200, NSW, A], [5019, Penrith, Penrith, Penrith, 2750, NSW, A], [5033, Blacktown, Marayong, Marayong, 2148, NSW, A], [5035, Rockdale, Building B,  Portside DC, Botany, 2019, NSW, A], [5037, Miranda, Westfield Shoppingtown, Miranda, 2228, NSW, A], [5052, Eastwood, Marayong Offsite Reserve, Marayong, 2148, NSW, A], [5055, Leichhardt, Marketown, Leichhardt, 2040, NSW, A]]')
		select('Table', 'cell:7|Loc_Addr_Ln3,3(Marayong)')
		rightclick('Table', '8|Loc_Postcode,4')
		select_menu('Show Column>>Brand_Id')
		select('Table', 'cell:7|Loc_Addr_Ln3,4(Botany)')
		assert_p('Table', 'Content', '[[TAR, 5866, WA Ad Support, , , , , A], [TAR, 5015, Bankstown, Bankstown, Condell Park, 2200, NSW, A], [TAR, 5019, Penrith, Penrith, Penrith, 2750, NSW, A], [TAR, 5033, Blacktown, Marayong, Marayong, 2148, NSW, A], [TAR, 5035, Rockdale, Building B,  Portside DC, Botany, 2019, NSW, A], [TAR, 5037, Miranda, Westfield Shoppingtown, Miranda, 2228, NSW, A], [TAR, 5052, Eastwood, Marayong Offsite Reserve, Marayong, 2148, NSW, A], [TAR, 5055, Leichhardt, Marketown, Leichhardt, 2040, NSW, A]]')
		select('Table', 'cell:7|Loc_Addr_Ln3,4(Botany)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:7|Loc_Addr_Ln3,4(Botany)')
		select('Table', 'cell:Field,3(Loc_Name)')
		assert_p('Table', 'Content', '[[Brand_Id, true], [Loc_Nbr, true], [Loc_Type, false], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, false], [Loc_Addr_Ln3, true], [Loc_Postcode, true], [Loc_State, true], [Loc_Actv_Ind, true]]')
##		select('Table', 'true', 'Show,2')
		select('Table', 'cell:Show,2(true)')
		click('Go')
		select('Table', 'cell:7|Loc_Addr_Ln3,4(Botany)')
		select('Table', 'cell:5|Loc_Addr_Ln1,4(Building B,  Portside DC)')
		assert_p('Table', 'Content', '[[TAR, 5866, DC, WA Ad Support, , , , , A], [TAR, 5015, ST, Bankstown, Bankstown, Condell Park, 2200, NSW, A], [TAR, 5019, ST, Penrith, Penrith, Penrith, 2750, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Marayong, 2148, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, Botany, 2019, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Miranda, 2228, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, Marayong, 2148, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Leichhardt, 2040, NSW, A]]')
		select('Table', 'cell:5|Loc_Addr_Ln1,4(Building B,  Portside DC)')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table1', 'cell:5|Loc_Addr_Ln1,4(Building B,  Portside DC)')
		select('Table', 'cell:Field,5(Loc_Addr_Ln2)')
		assert_p('Table', 'Content', '[[Brand_Id, true], [Loc_Nbr, true], [Loc_Type, true], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, false], [Loc_Addr_Ln3, true], [Loc_Postcode, true], [Loc_State, true], [Loc_Actv_Ind, true]]')
		select('Table', 'true', 'Show,5')
		select('Table', 'cell:Field,6(Loc_Addr_Ln3)')
		assert_p('Table', 'Content', '[[Brand_Id, true], [Loc_Nbr, true], [Loc_Type, true], [Loc_Name, true], [Loc_Addr_Ln1, true], [Loc_Addr_Ln2, true], [Loc_Addr_Ln3, true], [Loc_Postcode, true], [Loc_State, true], [Loc_Actv_Ind, true]]')
		select('Table', 'cell:Field,6(Loc_Addr_Ln3)')
		click('Go')
		select('Table', 'cell:5|Loc_Addr_Ln1,4(Building B,  Portside DC)')
		select('Table', 'cell:5|Loc_Addr_Ln1,3(Marayong)')
		assert_p('Table', 'Content', '[[TAR, 5866, DC, WA Ad Support, , , , , , A], [TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, 2750, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A]]')
	close()
